package com.ihome.android.market2.info;

import com.google.gson.annotations.Expose;
import com.ihome.android.dl.util.DLFileInfo;

import android.graphics.drawable.Drawable;

public class AppInfo {
	@Expose
	private String	appName;
	@Expose
	private String		appId;
	@Expose
	private String	apkFileSize;
	@Expose
	private String	iconUrl;
	@Expose
	private String	pkgName;
	@Expose
	private double	rate;
	@Expose
	private long	userNum;
	@Expose
	private int		categroyId;
	@Expose
	private String	appUrl;
	@Expose
	private String	filePath;
	@Expose
	private String	version;
	@Expose
	private boolean	needUpdate;
	@Expose
	private int		progress	= 0;
	@Expose
	private int		status		= DLFileInfo.STATUS_NULL;
	@Expose
	private String updateVersionDes;
	@Expose
	private String updateTime;

	//The application icon
	public Drawable	icon;
	//App User ID
	private int		uid;
	//缓存大小
	public long		cachesize;
	//数据大小
	public long		datasize;
	//应用程序大小
	public long		codesize;
	//应用程序总大小
	public long		totalsize;

	private boolean	hasFocus;

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("appName      = ").append(appName).append("\n");
		sb.append("appId        = ").append(appId).append("\n");
		sb.append("apkFileSize  = ").append(apkFileSize).append("\n");
		sb.append("iconUrl      = ").append(iconUrl).append("\n");
		sb.append("pkgName      = ").append(pkgName).append("\n");
		sb.append("rate         = ").append(rate).append("\n");
		sb.append("userNum      = ").append(userNum).append("\n");
		sb.append("categroyId   = ").append(categroyId).append("\n");
		sb.append("appUrl   	= ").append(appUrl).append("\n");
		sb.append("filePath   	= ").append(filePath).append("\n");
		sb.append("version   	= ").append(version).append("\n");
		sb.append("needUpdate   = ").append(needUpdate).append("\n");
		sb.append("progress   	= ").append(progress).append("\n");
		return sb.toString();
	}

	/**
	 * @return the categroyId
	 */
	public int getCategroyId() {
		return categroyId;
	}

	/**
	 * @param categroyId
	 *            the categroyId to set
	 */
	public void setCategroyId(int categroyId) {
		this.categroyId = categroyId;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	public double getRate() {
		return rate;
	}

	public void setRate(double rate) {
		this.rate = rate;
	}

	public String getApkFileSize() {
		return apkFileSize;
	}

	public void setApkFileSize(String apkFileSize) {
		this.apkFileSize = apkFileSize;
	}

	public long getUserNum() {
		return userNum;
	}

	public void setUserNum(long userNum) {
		this.userNum = userNum;
	}

	public String getPkgName() {
		return pkgName;
	}

	public void setPkgName(String pkgName) {
		this.pkgName = pkgName;
	}

	public String getAppUrl() {
		return appUrl;
	}

	public void setAppUrl(String appUrl) {
		this.appUrl = appUrl;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public boolean isNeedUpdate() {
		return needUpdate;
	}

	public void setNeedUpdate(boolean needUpdate) {
		this.needUpdate = needUpdate;
	}

	public int getProgress() {
		return progress;
	}

	public void setProgress(int progress) {
		this.progress = progress;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Drawable getIcon() {
		return icon;
	}

	public void setIcon(Drawable icon) {
		this.icon = icon;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public long getCachesize() {
		return cachesize;
	}

	public void setCachesize(long cachesize) {
		this.cachesize = cachesize;
	}

	public long getDatasize() {
		return datasize;
	}

	public void setDatasize(long datasize) {
		this.datasize = datasize;
	}

	public long getCodesize() {
		return codesize;
	}

	public void setCodesize(long codesize) {
		this.codesize = codesize;
	}

	public long getTotalsize() {
		return totalsize;
	}

	public void setTotalsize(long totalsize) {
		this.totalsize = totalsize;
	}

	public boolean isHasFocus() {
		return hasFocus;
	}

	public void setHasFocus(boolean hasFocus) {
		this.hasFocus = hasFocus;
	}

	public String getUpdateVersionDes() {
		return updateVersionDes;
	}

	public void setUpdateVersionDes(String updateVersionDes) {
		this.updateVersionDes = updateVersionDes;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public AppInfo() {}
}
